﻿using JTC.Genetics.Molecules._Interfaces;
using JTC.Genetics.Molecules.Proteins._Abstract;
using JTC.Genetics.Replication._Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JTC.Genetics.Molecules._Abstract
{
    public abstract class ChromosomeBase : IChromosome
    {
        private ITranslator _translator;

        public ChromosomeBase(ProteinBase protein, ITranslator translator)
        {
            this._protein = protein;
            this._translator = translator;
        }

        private DNA _dna;
        public DNA DNA
        {
            get
            {
                if (_dna == null)
                    _dna = new DNA();
                return _dna;
            }
        }

        private ProteinBase _protein;
        public ProteinBase Protein
        {
            get
            {
                return _protein;
            }
        }

        private RNA _rna;
        public RNA RNA
        {
            get
            {
                if (_rna == null)
                    _rna = new RNA(this._translator);
                return _rna;
            }
        }
    }
}
